{include file="public/header" /}
<title></title>
</head>

<body>
	<article class="page-container">
		<form class="form form-horizontal " id="form-admin-add" method="post">
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>鼓励金金额：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text" value="" placeholder="" id="price" name="price">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>操作密码：</label>
				<div class="formControls col-xs-8 col-sm-9">
					<input type="text" class="input-text" value="" placeholder="" id="op_pwd" name="op_pwd">
				</div>
			</div>

			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<input class="btn btn-primary radius" id='tijiao' type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
				</div>
			</div>
		</form>
	</article>
	{include file="public/footer" /}
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass: 'icheckbox-blue',
				radioClass: 'iradio-blue',
				increaseArea: '20%'
			});

			$('#tijiao').click(function() {
				var price=$('#price').val();
				if(isNaN(price)){
					layer.alert("请输入正确的鼓励金金额");
					return ;
				}
				$.ajax({
					type: 'post',
					data: {
						op_pwd: $('#op_pwd').val(),
						price: price,
						oem_id:'{$oem_id}'
					},
					url: "{:url('accounts/cz_glj')}",
					success: function(data) {
							layer.msg(data.msg, {
								icon: 1,
								time: 1000
							}, function() {
								window.parent.location.reload();
								var index = parent.layer.getFrameIndex(window.name);
								parent.layer.close(index);
							});
					},
					error: function(XmlHttpRequest, textStatus, errorThrown) {
						layer.msg(data.msg, {
							icon: 1,
							time: 1000
						});
					}
				});
			});
		});
	</script>